#coding=utf-8
'''
Created on Aug 9, 2011
@author: liyinhui
@moduleName: constants
@description: 站点常量定义集合
'''
import os
from os import path

#----------网站全局常量配置 ------------------
PUB_BEIAN = 'beian'
PUB_SITE_NAME = "i楼外"
PUB_HOST_NAME = "ilouwai.com"
#PUB_TEMPLATE_DIR用于pub/urls.py中
PUB_TEMPLATE_DIR = os.path.join(os.getcwd(),  'template')
#上传文件的保存根目录
PUB_UPLOAD_ROOT = os.path.join(os.getcwd(), 'uploads')

#验证码字体文件
FONT_FILE = path.join(PUB_TEMPLATE_DIR, 'msyh.ttf')
#验证码的session名称
VERIFY_CODE_IN_SESSION = "vcodeInSession"

##---------用户所在地区与域名的映射字典----------
locate_host = {
    '武汉' : 'wuhan',
    '北京' : 'beijing',
}

host_locate = dict()
for k,v in locate_host.iteritems():
    host_locate[v] = k

#----------集合配置-----------------------
STATUS_CHOICES = (
        ('1', '正常'),
        ('0', '锁定'),
    )

YESNO_CHOICES = (
        ('1', '是'),
        ('0', '否'),
    )
SALE_TYPE_CHOICES = (
        ('0', '出租'),
        ('1', '出售'),
    )
BUY_TYPE_CHOICES = (
        ('0', '求租'),
        ('1', '求购'),
    )
AUDIT_CHOICES = (
        ('0', '未审核'),
        ('1', '审核通过'),
        ('2', '审核不通过'),
    )
STORE_STATUS_CHOICES = (
        ('0', '正常'),
        ('1', '倒闭或搬迁'),
    )

